-- GENERATED SPELL FOR [Cabal Zealot] --


function spell0_18638(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18638', 3000, 1)
end

function spell1_18638(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15472,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18638', 3000, 1)
end

function spell2_18638(pUnit, Event) --@Shape of the Beast,Self--
pUnit:FullCastSpellOnTarget(33499,pUnit)
pUnit:RegisterEvent('Sorts_18638', 526, 1)
end

function Sorts_18638(pUnit, Event)
local choix_sorts_18638 = math.random(0, 2)
if choix_sorts_18638 == 0 then
pUnit:RegisterEvent('spell0_18638', 1, 1)
end
if choix_sorts_18638 == 1 then
pUnit:RegisterEvent('spell1_18638', 1, 1)
end
if choix_sorts_18638 == 2 then
pUnit:RegisterEvent('spell2_18638', 1, 1)
end
end

function mob18638_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18638', math.random(1500, 3000), 1)
end

function mob18638_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18638_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18638_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18638, 1, 'mob18638_Action')
RegisterUnitEvent(18638, 2, 'mob18638_Leave')
RegisterUnitEvent(18638, 3, 'mob18638_Kill')
RegisterUnitEvent(18638, 4, 'mob18638_Die')
